package hhh.app.domain.interactor;

import javax.inject.Inject;

import hhh.app.domain.repository.ProductRepository;
import rx.Observable;

/**
 * Created by hhh on 2017/3/20.
 */
public class GetCarts extends ProductCase {
    private final ProductRepository repository;

    public GetCarts setUid(int uid) {
        this.uid = uid;
        return this;
    }

    private int uid;

    @Inject
    public GetCarts(ProductRepository repository) {
        this.repository = repository;
    }

    @Override
    protected Observable buildProductCaseSubscriber() {
        return repository.carts(uid);
    }
}
